package com.farsight.service;
import  android.util.Log; 


public class LedService {
	/*
     * load native service.
     */
    static {
        Log.i ( "Java Service" , "Load Native Serivce LIB" );
        System.loadLibrary ( "led_runtime" );
    }

    public LedService() {
        String icount;
        Log.i ( "Java Service" , "do init Native Call" );
        _init ();
        icount = String.valueOf(_get_count ());
        Log.d ( "Java Service Init OK ",icount );
    }

    /*
     * LED native methods.
     */
    public String set_on(int arg) {
        Log.i ( "LedService,LED On", String.valueOf(arg) );
        _set_on (arg);
        return "led " + String.valueOf(arg) + "on";
    }
 

    public int set_off(int arg) {
    	Log.i ( "LedService,LED Off",String.valueOf(arg) );
        
        return _set_off (arg);
    }
   
    public int set_offa(int arg) {
    	
        
        return _set_offa (arg);
    }
   
     /*
     * declare all the native interface.
     */
    private static native boolean _init();
    private static native int _set_on(int arg);
    private static native int _set_off(int arg);
    private static native int _set_offa(int arg);
    private static native int _get_count(); 

}
